package com.proj.dao;

import com.proj.bean.User;
import com.proj.bean.Useraddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {

    User getUserByUsername(@Param("name")String name);

    User getuserById(@Param("userid")int userid);

    List<Useraddress> getaddress(@Param("userid")int userid);

    Useraddress getAddressById(@Param("id")int id);

    int add(@Param("address")Useraddress address);

    int edit(@Param("address")Useraddress address);

    int delete(@Param("id")int id);

    int cancelDefault(@Param("userid")int userid);

    int setDefault(@Param("id")int id);

    int newuser(@Param("user")User user);

    int newpass(@Param("password")String password,@Param("userid")Integer userid);

}
